#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int sum()
{
	int sum = 0;
	int a = 0;
	char b = '0';
	do {
		scanf("%d", &a);
		sum = a + sum;
		if (a == 0)
			break;
	} while ((b = getchar() == '\n'));
	printf("%d\n", sum);
	return sum;
}

